package masterSpringMvc.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import masterSpringMvc.model.Tweet;
import masterSpringMvc.service.SearchService;

@Service
public class SearchServiceImpl implements SearchService{

	@Override
	public List<Tweet> search(String searchType, List<String> keywords) {
		List<Tweet> list = new ArrayList<>();
		for(int i=0;i<keywords.size();i++) {
			Tweet tweet = new Tweet();
			tweet.setSearchType(searchType);
			tweet.setKeyword(keywords.get(i));
			list.add(tweet);
		}
		return list;
	}

}
